<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 28644
  Date: 2022/7/30
  Time: 9:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<style>
    body{
        /* 设置背景渐变 */
        background-image: linear-gradient(to left,
        #9c88ff,#3cadeb);
        display: flex;
        justify-content: center;
    }
    .a{
        position:relative;
        top: 100px;
        width: 1100px;
        height: 550px;
        box-shadow: 0 5px 15px rgba(0,0,0,.8);
        display: flex;
    }
    .b{
        width: 1100px;
        height: 550px;
    }
    table tr td {
        text-align: center;
    }
    .inputstyle{
        width: 90px;
    }
    <%@ include file="/pages/common/a_style.jsp"%>
</style>
<body>
<div class="a">

    <div class="b">

        <table style="margin: 0 auto; width: 1100px;">
            <p style="text-align: center; color: red">${msg}</p>
            <tr>
                <td>车牌</td>
                <td>品牌</td>
                <td>模型</td>
                <td>颜色</td>
                <td>款式</td>
                <td>排量</td>
                <td>价格</td>
                <td>价格/小时</td>
                <td>状态</td>
                <td>可用</td>
                <td colspan="2">操作</td>
            </tr>
                <tr>
                    <form action="/Admin/CarServlet?action=add" method="post">
                        <input type="hidden" value="add" name="aa">
                        <td><input type="text" value="${cars.car_Number}"class="inputstyle" name="car_Number"></td>
                        <td>
                            <select name="brand_Name">
                                <c:if test="${not empty brands}">
                                    <c:forEach begin="0" end="${brands.size()-1}" var="i">
                                        <option>${brands[i].name}</option>
                                    </c:forEach>
                                </c:if>
                            </select>
                        </td>
                        <td><input type="text" value="${cars.model}"class="inputstyle" name="model"></td>
                        <td><input type="text" value="${cars.color}"class="inputstyle" name="color"></td>
                        <td>
                            <select name="category_Name">
                                <c:if test="${not empty categories}">
                                    <c:forEach begin="0" end="${categories.size()-1}" var="i">
                                        <option>${categories[i].name}</option>
                                    </c:forEach>
                                </c:if>
                            </select>
                        </td>
                        <td><input type="text" value="${cars.t_Comments}"class="inputstyle" name="t_Comments"></td>
                        <td><input type="text" value="${cars.price}"class="inputstyle" name="price"></td>
                        <td><input type="text" value="${cars.rent}"class="inputstyle" name="rent"></td>
                        <td>
                            <select name="status">
                                <option selected="selected">未出租</option>
                                <option>出租</option>
                            </select>

                        </td>
                        <td>
                            <select name="useAble">
                                <option selected="selected">可用</option>
                                <option>不可用</option>
                        </select>
                        </td>

                        <td><input type="submit"></td>

                    </form>
                </tr>
        </table>
    </div>
</div>
</body>
</html>
